import Vue from 'vue'
import App from './App'
import './static/css/index.css'
import { request } from './util/request.js'

Vue.prototype.$ajax = request
Vue.config.productionTip = false
import store from './store'
//把vuex定义成全局组件
Vue.prototype.$store = store
App.mpType = 'app'
Vue.prototype.$go = (url) => {
	if(!store.state.Authorization){
		uni.showToast({
			title: '请先登陆',
			icon:'none'
		});
		uni.switchTab({
			url:'/pages/user/user'
		})
		return false
	}
	uni.navigateTo({
		url
	})
}
const app = new Vue({
    ...App,
	store
})
app.$mount()
